﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Traversing - Finding</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            var len = $(".hilite").siblings()
                          .css("color", "red")
                          .length;
            $("b").text(len);
        });
    </script>
</head>
<body>
    <ul> 
        <li>One</li> 
        <li>Two</li> 
        <li class="hilite">Three</li> 
        <li>Four</li> 
    </ul> 

    <ul> 
        <li>Five</li> 
        <li>Six</li> 
        <li>Seven</li> 
    </ul> 
    
    <ul> 
        <li>Eight</li> 
        <li class="hilite">Nine</li> 
        <li>Ten</li> 
        <li class="hilite">Eleven</li> 
    </ul> 
    
    <p>Unique siblings: <b></b></p>
</body>
</html>
